#include "QcNewWordDialog.h"
#include "ui_newworddialog.h"

QcNewWordDialog::QcNewWordDialog(QWidget *parent)
    : QDialog(parent)
    , ui(new Ui::QcNewWordDialog)
{
    ui->setupUi(this);
}

QcNewWordDialog::~QcNewWordDialog()
{
    delete ui;
}

QString QcNewWordDialog::word() const
{
    return ui->word->text();
}

QString QcNewWordDialog::phonetic() const
{
    return ui->pron->text();
}

QString QcNewWordDialog::pos() const
{
    return ui->pos->text();
}

QString QcNewWordDialog::chinese() const
{
    return ui->chinese->text();
}

QString QcNewWordDialog::example() const
{
    return ui->example->toPlainText();
}

void QcNewWordDialog::setWord(const QString& str)
{
    ui->word->setText(str);
}

void QcNewWordDialog::setPhonetic(const QString& str)
{
    ui->pron->setText(str);
}

void QcNewWordDialog::setPos(const QString& str)
{
    ui->pos->setText(str);
}

void QcNewWordDialog::setChinese(const QString& str)
{
    ui->chinese->setText(str);
}

void QcNewWordDialog::setExample(const QString& str)
{
    ui->example->setPlainText(str);
}

